Skip to content

fix(project): set requires-python >=3.12 in the BMA template - #2492

Merged
tejaskash merged 1 commit into
refactorfrom
fix/bma-requires-python-refactor
Sep 30, 2026
Merged

tejaskash merged 1 commit into
refactorfrom
fix/bma-requires-python-refactor

Conversation

@tejaskash

Copy link
Copy Markdown
Contributor

Description

Mirrors #2491 to refactor. The BMA template pyproject.toml has no requires-python, so on macOS uv run client.py can pick the system Python 3.9, and openai does not install on it.

This sets requires-python = ">=3.12". It is a minimum only. The Dockerfile runs uv python install --default before it copies pyproject.toml, so the image keeps the latest Python. The README line for pyproject.toml says why the minimum is there, and the BMA contract test checks the minimum and the Dockerfile order.

Related Issue

No issue. Mirrors #2491, which came from feedback on the BMA getting started guide.

Documentation PR

Template README updated in this PR.

Type of Change

  • Bug fix

Testing

  • I ran bun test (3950 pass)
  • End to end: built the CLI, ran agentcore create --template bedrock-managed-agents, and confirmed the generated pyproject.toml and README. No deploy, the change does not touch deployed resources.
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • No snapshots cover the BMA assets

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works

Mirrors #2491. Without a minimum, uv run client.py can pick the macOS
system Python 3.9, which openai does not support.
@github-actions github-actions Bot added the size/xs PR size: XS label Sep 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 30, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentCore Harness Review

Verdict: Looks good

Small, well-scoped template fix. Confirmed against the repo:

  • Dockerfile runs RUN uv python install --default at line 27 and COPY pyproject.toml at line 33, so requires-python = ">=3.12" acts as a floor and does not pin the image's Python version — matches what the README and PR description claim.
  • The new regex assertion in bedrockManagedAgents.test.ts (RUN uv python install --default\n[\s\S]*COPY pyproject\.toml) correctly guards that ordering, so a future reorder that would inadvertently make requires-python pin the image Python would fail the test.
  • >=3.12 is consistent with the openai>=3.16.2 dev dependency's own Python floor, so uv run client.py on a macOS host with only system Python 3.9 will now do the right thing.
  • No telemetry or mocking concerns — this is a static template + assertion change.

Nothing blocking. LGTM.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.39%. Comparing base (238e54e) to head (6d9253d).

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2492   +/-   ##
=========================================
  Coverage     97.39%   97.39%           
=========================================
  Files           642      642           
  Lines         46801    46801           
=========================================
  Hits          45584    45584           
  Misses         1217     1217           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tejaskash
tejaskash merged commit 23a3704 into refactor Sep 30, 2026
21 of 23 checks passed
@tejaskash
tejaskash deleted the fix/bma-requires-python-refactor branch September 30, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants